<template>
  <div>
    <h1 class="title">精品推荐</h1>
    <div class="card-box">
      <div v-for="(item,index) in goods" :key="index" class="card-item">
        <ReCard :goods="item"></ReCard>
      </div>
    </div>
  </div>
</template>
<script>
import ReCard from "@/views/widgets/RecommendCard"
import config from "@/config/config"
export default {
  components: { ReCard },
  data () {
    return {
      goods: config.goods.map((item,index) => ({
        img: item.poster,
        title: item.text,
        price: item.price,
        index: index,
      })),
    }
  },
}
</script>
<style scoped>
.title{
  display: flex;
}
.card-box{
  display: flex;
}
.card-item{
  width: 25%;
  height: 320px;
  background-color: whitesmoke;
  margin: 10px;
  border: 4px solid navajowhite;
  border-radius: 8px;
}
</style>